import instance from '@/utils/request'
export function getDepartmentApi () {
  return instance({
    url: '/company/department'
  })
}
export function delDeparrtmentApi (id) {
  return instance({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
export function addDeparrtmentApi (data) {
  return instance({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 根据id获取部门信息
export function getDepartmentByIdApi (id) {
  return instance({
    url: `/company/department/${id}`
  })
}
// 根据id修改部门信息
export function updateDeparmentApi (data) {
  return instance({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data: data
  })
}
